package action;

import modele.Client;

import com.opensymphony.xwork2.ActionSupport;

import data.ClientXML;

public class DetailClient extends ActionSupport {

	private static final long serialVersionUID = 1694670991851843191L;

	private int idClient;
	private int id;
	private String nom;
	private String prenom;
	private String adresse;
	private String email;
	
	public String execute() throws Exception {
		ClientXML clientXML = new ClientXML();
		Client client = clientXML.getClient(idClient);
		if (client != null) {
			id = client.getId();
			nom = client.getNom();
			prenom = client.getPrenom();
			adresse = client.getAdresse();
			email = client.getEmail();
		}
		return SUCCESS;
	}

	public int getIdClient() {
		return idClient;
	}

	public void setIdClient(int idClient) {
		this.idClient = idClient;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getAdresse() {
		return adresse;
	}

	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
}